<template>
  <div id="protocol">
    <van-checkbox v-model="checked" class="checked" @change="getcheck">
      <span>我已阅读并同意以下协议</span>
      <span class="protocol">
        《用户协议》、《知情同意书》、《智云健康隐私政策》
      </span>
    </van-checkbox>
  </div>
</template>

<script>
import { ref, onMounted } from "vue";
export default {
  props: {},
  setup(props, { emit }) {
    let checked = ref(false);
    const getcheck = (checked) => {
      emit("getcheck", checked);
    };
    onMounted(() => {
      emit("getcheck", checked.value);
    });
    return {
      checked,
      getcheck,
    };
  },
};
</script>
<style lang="less">
#protocol {
  padding: 20px 0;
  span {
    font-size: 12px;
  }
  .protocol {
    color: #75bbd9;
  }
}
</style>
